package com.itheima.stock.service;

import com.github.pagehelper.PageInfo;
import com.itheima.stock.common.domian.RoleAddDomain;
import com.itheima.stock.common.domian.UserPageDomain;
import com.itheima.stock.vo.req.UserMenus;
import com.itheima.stock.vo.resp.PageResult;
import com.itheima.stock.vo.result.R;

import java.util.List;

/**
 * @author: siwukun
 * @date: 2022/06/10
 * @description: 角色操作
 */
public interface RolesService {
    /**
     * 角色分页查询
     * @param pageNum 当前页码
     * @param pageSize 条数
     * @return
     */
    R<PageResult<PageInfo>> getUserByPageInfo(UserPageDomain userPageDomain);

    R<List<UserMenus>> getPermissionEcho();

    R<String> addRoles(RoleAddDomain roleAddDomain);

    R<List<String>> getAllPid(String roleId);

    R<String> updateRoleByRoleId(RoleAddDomain roleAddDomain);

    /**
     * 根据角色id删除角色信息
     * @param roleId 角色id
     * @return
     */
    R<String> deleteFormById(String roleId);

    R<String> updateRoleStatus(String roleId, Integer status);
}
